<template>
    <div class="cms-menu">
        <el-menu
                :default-active="active"
                background-color="#2a3542"
                text-color="#fff"
                :router="true"
                :unique-opened="true"
                active-text-color="#1e83f0">
            <el-menu-item index="/main">
                <i class="fa fa-wechat"></i>
                <span slot="title">&nbsp;&nbsp;&nbsp;微小程序</span>
            </el-menu-item>
            <el-menu-item v-for="(router,index) in routers[0].children"
                          :index="router.path" v-if="router.meta.show" :key="index">
                <i :class="router.meta.icon"></i>
                <span>&nbsp;&nbsp;&nbsp;{{router.meta.title}}</span>
            </el-menu-item>
        </el-menu>
    </div>

</template>

<script>
    import {mapGetters} from 'vuex';
    export default {
        computed: {
            ...mapGetters(['active','routers']),
        },
    }
</script>
